import "crvpuppet"

define at3_dnsmasq($webaddr="", $roleid="") {
  if $AutoMode==true and $CloudCRV==true {
  }
  
  if ( $AutoMode == false ) or ( $AutoMode==true and $CloudCRV==true ) {
    package { "dnsmasq":
      ensure => installed,
    }
    
    service { "dnsmasq":
      ensure => running,
      enable => true,
      require => Package["dnsmasq"],
    }
    
    file { "/etc/dnsmasq.conf":
      owner => "root",
      group => "root",
      mode => 644,
      content => template("at3_dnsmasq/etc-dnsmasq.conf"),
      notify => Service["dnsmasq"],
    }

  }
  
  if $AutoMode==true and $CloudCRV==true {
    #set_role_attr($webaddr,$roleid,"ProfileApplied","True")
  }
}

